<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let obj = new Object()
        obj.name = 'rose'
        obj.age = 20
        //Object.keys方法：获取对象的成员名
        const res1 = Object.keys(obj)
        console.log(res1);
        //Object.values方法：获取对象的值
        const res2 = Object.values(obj)
        console.log(res2);

        const person = {}
        //Object.assign方法：将参数2对象中的数据拷贝给参数1对象
        Object.assign(person,obj)
        console.log(person);
    </script>
</body>
</html>